<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QGraphicsEllipseItem Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QGraphicsEllipseItem Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QGraphicsEllipseItem class provides an ellipse item that you
can add to a <a href="qgraphicsscene.html">QGraphicsScene</a>.
<a href="#details">More...</a></p>

<p>Inherits <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>.</p><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#QGraphicsEllipseItem">__init__</a></b> (<i>self</i>, QGraphicsItem&#160;<i>parent</i>&#160;=&#160;None, QGraphicsScene&#160;<i>scene</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#QGraphicsEllipseItem-2">__init__</a></b> (<i>self</i>, QRectF&#160;<i>rect</i>, QGraphicsItem&#160;<i>parent</i>&#160;=&#160;None, QGraphicsScene&#160;<i>scene</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#QGraphicsEllipseItem-3">__init__</a></b> (<i>self</i>, float&#160;<i>x</i>, float&#160;<i>y</i>, float&#160;<i>w</i>, float&#160;<i>h</i>, QGraphicsItem&#160;<i>parent</i>&#160;=&#160;None, QGraphicsScene&#160;<i>scene</i>&#160;=&#160;None)</li><li><div class="fn" />QRectF <b><a href="qgraphicsellipseitem.html#boundingRect">boundingRect</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsellipseitem.html#contains">contains</a></b> (<i>self</i>, QPointF&#160;<i>point</i>)</li><li><div class="fn" />bool <b><a href="qgraphicsellipseitem.html#isObscuredBy">isObscuredBy</a></b> (<i>self</i>, QGraphicsItem&#160;<i>item</i>)</li><li><div class="fn" />QPainterPath <b><a href="qgraphicsellipseitem.html#opaqueArea">opaqueArea</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#paint">paint</a></b> (<i>self</i>, QPainter&#160;<i>painter</i>, QStyleOptionGraphicsItem&#160;<i>option</i>, QWidget&#160;<i>widget</i>&#160;=&#160;None)</li><li><div class="fn" />QRectF <b><a href="qgraphicsellipseitem.html#rect">rect</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#setRect">setRect</a></b> (<i>self</i>, QRectF&#160;<i>rect</i>)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#setRect-2">setRect</a></b> (<i>self</i>, float&#160;<i>ax</i>, float&#160;<i>ay</i>, float&#160;<i>w</i>, float&#160;<i>h</i>)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#setSpanAngle">setSpanAngle</a></b> (<i>self</i>, int&#160;<i>angle</i>)</li><li><div class="fn" /><b><a href="qgraphicsellipseitem.html#setStartAngle">setStartAngle</a></b> (<i>self</i>, int&#160;<i>angle</i>)</li><li><div class="fn" />QPainterPath <b><a href="qgraphicsellipseitem.html#shape">shape</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgraphicsellipseitem.html#startAngle">startAngle</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qgraphicsellipseitem.html#type">type</a></b> (<i>self</i>)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QGraphicsEllipseItem class provides an ellipse item that you
can add to a <a href="qgraphicsscene.html">QGraphicsScene</a>.</p>
<p>QGraphicsEllipseItem respresents an ellipse with a fill and an
outline, and you can also use it for ellipse segments (see <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>(), <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>()).</p>
<table class="generic">
<tr class="odd" valign="top">
<td><img alt="" src="images/graphicsview-ellipseitem.png" /></td>
<td><img alt="" src="images/graphicsview-ellipseitem-pie.png" /></td>
</tr>
</table>
<p>To set the item's ellipse, pass a <a href="qrectf.html">QRectF</a> to QGraphicsEllipseItem's constructor, or
call <a href="qgraphicsellipseitem.html#setRect">setRect</a>(). The
<a href="qgraphicsellipseitem.html#rect">rect</a>() function
returns the current ellipse geometry.</p>
<p>QGraphicsEllipseItem uses the rect and the pen width to provide
a reasonable implementation of <a href="qgraphicsellipseitem.html#boundingRect">boundingRect</a>(),
<a href="qgraphicsellipseitem.html#shape">shape</a>(), and <a href="qgraphicsellipseitem.html#contains">contains</a>(). The <a href="qgraphicsellipseitem.html#paint">paint</a>() function draws the
ellipse using the item's associated pen and brush, which you can
set by calling <a href="qabstractgraphicsshapeitem.html#setPen">setPen</a>() and <a href="qabstractgraphicsshapeitem.html#setBrush">setBrush</a>().</p>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QGraphicsEllipseItem" />QGraphicsEllipseItem.__init__ (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qgraphicsscene.html">QGraphicsScene</a>&#160;<i>scene</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>The <i>scene</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a>. <i>parent</i>
is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s
constructor.</p>
<p><b>See also</b> <a href="qgraphicsscene.html#addItem">QGraphicsScene.addItem</a>().</p>


<h3 class="fn"><a name="QGraphicsEllipseItem-2" />QGraphicsEllipseItem.__init__ (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>rect</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qgraphicsscene.html">QGraphicsScene</a>&#160;<i>scene</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>The <i>scene</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a> using
<i>rect</i> as the default rectangle. <i>parent</i> is passed to
<a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s
constructor.</p>
<p><b>See also</b> <a href="qgraphicsscene.html#addItem">QGraphicsScene.addItem</a>().</p>


<h3 class="fn"><a name="QGraphicsEllipseItem-3" />QGraphicsEllipseItem.__init__ (<i>self</i>, float&#160;<i>x</i>, float&#160;<i>y</i>, float&#160;<i>w</i>, float&#160;<i>h</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>parent</i>&#160;=&#160;None, <a href="qgraphicsscene.html">QGraphicsScene</a>&#160;<i>scene</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>The <i>scene</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qgraphicsellipseitem.html">QGraphicsEllipseItem</a> using the
rectangle defined by (<i>x</i>, <i>y</i>) and the given
<i>width</i> and <i>height</i>, as the default rectangle.
<i>parent</i> is passed to <a href="qabstractgraphicsshapeitem.html">QAbstractGraphicsShapeItem</a>'s
constructor.</p>
<p>This function was introduced in Qt 4.3.</p>
<p><b>See also</b> <a href="qgraphicsscene.html#addItem">QGraphicsScene.addItem</a>().</p>


<h3 class="fn"><a name="boundingRect" /><a href="qrectf.html">QRectF</a> QGraphicsEllipseItem.boundingRect (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#boundingRect">QGraphicsItem.boundingRect</a>().</p>


<h3 class="fn"><a name="contains" />bool QGraphicsEllipseItem.contains (<i>self</i>, <a href="qpointf.html">QPointF</a>&#160;<i>point</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#contains">QGraphicsItem.contains</a>().</p>


<h3 class="fn"><a name="isObscuredBy" />bool QGraphicsEllipseItem.isObscuredBy (<i>self</i>, <a href="qgraphicsitem.html">QGraphicsItem</a>&#160;<i>item</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#isObscuredBy">QGraphicsItem.isObscuredBy</a>().</p>


<h3 class="fn"><a name="opaqueArea" /><a href="qpainterpath.html">QPainterPath</a> QGraphicsEllipseItem.opaqueArea (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#opaqueArea">QGraphicsItem.opaqueArea</a>().</p>


<h3 class="fn"><a name="paint" />QGraphicsEllipseItem.paint (<i>self</i>, <a href="qpainter.html">QPainter</a>&#160;<i>painter</i>, <a href="qstyleoptiongraphicsitem.html">QStyleOptionGraphicsItem</a>&#160;<i>option</i>, <a href="qwidget.html">QWidget</a>&#160;<i>widget</i>&#160;=&#160;None)</h3><p>Reimplemented from <a href="qgraphicsitem.html#paint">QGraphicsItem.paint</a>().</p>


<h3 class="fn"><a name="rect" /><a href="qrectf.html">QRectF</a> QGraphicsEllipseItem.rect (<i>self</i>)</h3><p>Returns the item's ellipse geometry as a <a href="qrectf.html">QRectF</a>.</p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#setRect">setRect</a>() and <a href="qpainter.html#drawEllipse">QPainter.drawEllipse</a>().</p>


<h3 class="fn"><a name="setRect" />QGraphicsEllipseItem.setRect (<i>self</i>, <a href="qrectf.html">QRectF</a>&#160;<i>rect</i>)</h3><p>Sets the item's ellipse geometry to <i>rect</i>. The rectangle's
left edge defines the left edge of the ellipse, and the rectangle's
top edge describes the top of the ellipse. The height and width of
the rectangle describe the height and width of the ellipse.</p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#rect">rect</a>() and <a href="qpainter.html#drawEllipse">QPainter.drawEllipse</a>().</p>


<h3 class="fn"><a name="setRect-2" />QGraphicsEllipseItem.setRect (<i>self</i>, float&#160;<i>ax</i>, float&#160;<i>ay</i>, float&#160;<i>w</i>, float&#160;<i>h</i>)</h3><p>Sets the item's rectangle to the rectangle defined by (<i>x</i>,
<i>y</i>) and the given <i>width</i> and <i>height</i>.</p>
<p>This convenience function is equivalent to calling
<tt>setRect(QRectF(x, y, width, height))</tt></p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#rect">rect</a>().</p>


<h3 class="fn"><a name="setSpanAngle" />QGraphicsEllipseItem.setSpanAngle (<i>self</i>, int&#160;<i>angle</i>)</h3><p>Sets the span angle for an ellipse segment to <i>angle</i>,
which is in 16ths of a degree. This angle is used together with
<a href="qgraphicsellipseitem.html#startAngle">startAngle</a>() to
represent an ellipse segment (a pie). By default, the span angle is
5760 (360 * 16, a full ellipse).</p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>(), <a href="qgraphicsellipseitem.html#setStartAngle">setStartAngle</a>(), and
<a href="qpainter.html#drawPie">QPainter.drawPie</a>().</p>


<h3 class="fn"><a name="setStartAngle" />QGraphicsEllipseItem.setStartAngle (<i>self</i>, int&#160;<i>angle</i>)</h3><p>Sets the start angle for an ellipse segment to <i>angle</i>,
which is in 16ths of a degree. This angle is used together with
<a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>() for
representing an ellipse segment (a pie). By default, the start
angle is 0.</p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>(), <a href="qgraphicsellipseitem.html#setSpanAngle">setSpanAngle</a>(), and
<a href="qpainter.html#drawPie">QPainter.drawPie</a>().</p>


<h3 class="fn"><a name="shape" /><a href="qpainterpath.html">QPainterPath</a> QGraphicsEllipseItem.shape (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#shape">QGraphicsItem.shape</a>().</p>


<h3 class="fn"><a name="spanAngle" />int QGraphicsEllipseItem.spanAngle (<i>self</i>)</h3><p>Returns the span angle of an ellipse segment in 16ths of a
degree. This angle is used together with <a href="qgraphicsellipseitem.html#startAngle">startAngle</a>() for
representing an ellipse segment (a pie). By default, this function
returns 5760 (360 * 16, a full ellipse).</p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#setSpanAngle">setSpanAngle</a>() and
<a href="qgraphicsellipseitem.html#startAngle">startAngle</a>().</p>


<h3 class="fn"><a name="startAngle" />int QGraphicsEllipseItem.startAngle (<i>self</i>)</h3><p>Returns the start angle for an ellipse segment in 16ths of a
degree. This angle is used together with <a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>() for
representing an ellipse segment (a pie). By default, the start
angle is 0.</p>
<p><b>See also</b> <a href="qgraphicsellipseitem.html#setStartAngle">setStartAngle</a>() and
<a href="qgraphicsellipseitem.html#spanAngle">spanAngle</a>().</p>


<h3 class="fn"><a name="type" />int QGraphicsEllipseItem.type (<i>self</i>)</h3><p>Reimplemented from <a href="qgraphicsitem.html#type">QGraphicsItem.type</a>().</p>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;snapshot-4.9.5-9eb6aac99275 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.3</td></tr></table></div></address></body></html>